//método que pega a altura ou largura INTERNA da janela do usuário.
function returnSize (type){
		var type = (type)? type : "";
		if (document.all)
		{
				//pegando o Altura tela no IE.
				if (!document.documentElement.clientHeight)
						var height = document.body.clientHeight;                                                
				else
						var height = document.documentElement.clientHeight;             
						
				//pegando a Largura tela no IE.                         
				if (!document.documentElement.clientWidth)
						var width = document.body.clientWidth;                                          
				else
						var width = document.documentElement.clientWidth;                                               
		}
		else
		{
				//pegando a Altura tela no FF.                  
						var height = window.innerHeight;
				//pegando a Largura tela no FF.                 
						var width  = window.innerWidth;                         
		}       

		if (type.toLowerCase()=="w")
		{
				return width;
		}
		else if (type.toLowerCase()=="h")
		{
				return height;
		}
		else
		{
				var arr = new Array(2);
				arr[0] = width;
				arr[1] = height;                        
				return arr;
		}       
}


jQuery(document).ready(function() {	
	var marginTop = ((returnSize("h")-646)/2);	
	var marginLeft = ((returnSize("w")-960)/2);	
	if(marginTop > 0)
		jQuery("#geral").css('margin-top', marginTop);
	if(marginLeft > 0)
		jQuery("#geral").css('margin-left', marginLeft);
		
	jQuery('#conteudo').tinyscrollbar();
	
		
});

function verificaForm(idForm, arrayObrigatorio){
	var e = 0;
	var isErro = false;
	for(ob=0; ob<arrayObrigatorio.length; ob++){
		if(jQuery("#"+arrayObrigatorio[ob]).val()==""){
			jQuery("#"+arrayObrigatorio[ob]).css({border:"1px #FF0000 solid"});
			isErro = true;
		}
	}
	if(isErro)
		return false;
	else{
		//post do contato
		jQuery("#"+idForm).submit();
	}
}
